package com._520it.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

//新增投保
@Setter@Getter@ToString
public class OrderBill {
    public static final int STATUS_YES = 1;        //已删除
    public static final int STATUS_NO  = 0;         //未删除

    public static final int UNSUBMIT = 0;           //未提交
    public static final int PREUNDERWRITING = 1;    //待审核
    public static final int SUPERUNDERWRITING = 2;  //提交上级审核
    public static final int PREREVISE = 3;          //待批改
    public static final int PREPAYMENT = 4;         //待缴费
    public static final int VALID = 5;              //已缴费
    public static final int EXPIRED = 6;            //已作废
    public static final int REVISETOUNDERWRITING = 7;            //批改待审核

    private Long id;

    private Organization organization;            //承保机构

    private String carPlateNumber;                //车牌号

    private Client aplicant;                      //投保人

    private Client recognizee;                    //被保人

    private Client carOwner;                      //车主

    private ClientCar clientCar;                  //车辆

    private Driver driver;                        //驾驶员

    private Insurance insurance;           //险别

    private BankAccount bankAccount;              //银行账户

    private Tax ratePayment;                      //缴税

    private int remove;                       //是否已删除

    private int status;                           //保单状态

    private Employee employee;                    //录入人员
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputTime;                       //录入时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date beginDate;                       //保险开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endDate;                         //保险结束时间

    private String insureBillNumber;              //投保单号

    private Product product;                      //产品
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date wittingDate;                    //核保操作时间

    private BigDecimal totalMoney;               //总金额
}